package me.shiqiang.im.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by John on 2018/6/1
 */
public class GroupChangeLogType {
    public static final Map<Integer, Integer> CHANGE_TYPE_MAP = new HashMap<>();

    public static final Integer ADD_MEMBER = 1;//添加成员
    public static final Integer DEL_MEMBER = 2;//删除成员
    public static final Integer NICK_NAME_CHANGE = 3;//改变昵称
    public static final Integer HEADER_CHANGE = 4;//表头变更(群属性)
    public static final Integer SINGLE_MUTE = 6;//单人禁言
    public static final Integer DISMISS_SINGLE_MUTE = 7;//解除单人禁言
    public static final Integer ASSIGN_ADMIN = 8;//任命管理员
    public static final Integer RELIEVE_ADMIN = 9;//解除管理员权限

    static {
        CHANGE_TYPE_MAP.put(ADD_MEMBER,  10000);//添加成员
        CHANGE_TYPE_MAP.put(DEL_MEMBER, -10000);//删除成员
        CHANGE_TYPE_MAP.put(NICK_NAME_CHANGE, 1);//改变昵称
        CHANGE_TYPE_MAP.put(HEADER_CHANGE, 0);//表头变更(群属性)
        CHANGE_TYPE_MAP.put(SINGLE_MUTE, 1);//单人禁言
        CHANGE_TYPE_MAP.put(DISMISS_SINGLE_MUTE, 1);//解除单人禁言
        CHANGE_TYPE_MAP.put(ASSIGN_ADMIN, 1);//任命管理员
        CHANGE_TYPE_MAP.put(RELIEVE_ADMIN, 1);//解除管理员权限
    }
}
